nLab distributive law

Redirected from "distributive laws".

Contents

Idea

Sometimes in mathematics one considers objects equipped with two different types of extra structure which interact in a suitable way. For instance, a ring is a set equipped with both (1) the structure of an (additive) abelian group and (2) the structure of a (multiplicative) monoid, which satisfy the distributive laws a(b+c)=ab+aca\cdot (b+c) = a\cdot b + a\cdot c and a0=0a\cdot 0 = 0.

Abstractly, there are two monads on the category Set, one (call it TT) whose algebras are abelian groups, and one (call it SS) whose algebras are monoids, and so we might ask “can we construct, from these two monads, a third monad whose algebras are rings?” Such a monad would assign to each set XX the free ring on that set, which consists of formal sums of formal products of elements of XX—in other words, it can be identified with T(S(X))T(S(X)). Thus the question becomes “given two monads TT and SS, what further structure is required to make the composite TST S into a monad?”

It is easy to give TST S a unit, as the composite Idη SSη TSTSId \xrightarrow{\eta^S} S \xrightarrow{\eta^T S} T S, but to give it a multiplication we need a transformation from TSTST S T S to TST S. We naturally want to use the multiplications μ T:TTT\mu^T\colon T T \to T and μ S:SSS\mu^S\colon S S \to S, but in order to do this we first need to switch the order of TT and SS. However, if we have a transformation λ:STTS\lambda\colon S T \to T S, then we can define μ TS\mu^{T S} to be the composite TSTSλTTSSμ Tμ STST S T S \xrightarrow{\lambda} T T S S \xrightarrow{\mu^T\mu^S} T S.

Such a transformation λ:STTS\lambda\colon S T \to T S, satisfying suitable axioms to make TST S into a monad, is called a distributive law, because of the motivating example relating addition to multiplication in a ring. In that case, STXS T X is a formal product of formal sums such as (x 1+x 2+x 3)(x 4+x 5)(x_1 + x_2 + x_3)\cdot (x_4 + x_5), and the distributive law λ\lambda is given by multiplying out such an expression formally, resulting in a formal sum of formal products such as x 1x 4+x 1x 5+x 2x 4+x 2x 5+x 3x 4+x 3x 5x_1\cdot x_4 + x_1 \cdot x_5 + x_2 \cdot x_4 + x_2 \cdot x_5 + x_3\cdot x_4 + x_3 \cdot x_5.

Given two monads S,TS, T on a category CC, a distributive law TSST T \circ S \longrightarrow S \circ T gives a way of lifting the monad SS on CC to a monad on the category of TT-algebras, namely the Eilenberg-Moore category C TC^T. In the example above, the distributive law gives a way to lift the monad for monoids (which is a monad on C=SetC = Set) to the monad for rings (which is a monad on C T=AbGpC^T = AbGp). This is a way of making rigorous the intuition that “rings are to abelian groups as monoids are to sets”.

Remark

(terminology – what distributes over what)
The eponymous example of distributivity in arithmetic

a× ib i= ia×b i a \times \sum_i b_i \;=\; \sum_i a \times b_i

hence

(a×())(())=(())(a×()) \big( a \times (-) \big) \circ \big( \sum (-) \big) \;\; = \;\; \big( \sum (-) \big) \circ \big( a \times (-) \big)

(where, of course, the equality as such works in both directions, but the distribution of factors over summands is the step from left to right) suggests that a suitable transformation of (co)monads of the form

STTS S \circ T \longrightarrow T \circ S

should be referred to as SS distributing over TT instead of the other way around.

However, already the original reference Beck 1969 §1 uses the opposite terminology.

Authors sticking to this original but arguably reverse terminological convention include Brookes & Van Stone 1993, while other authors tacitly switch to the other terminological convention (eg. Barr & Wells 1985 §9 2.1, Power & Watanabe 2002 p. 138).

Big picture

Monads in any 2-category CC make themselves a 2-category Mnd\mathrm{Mnd} in which 1-morphisms are either lax or colax homomorphisms of monads (cf. monad transformations). By formal duality the analogue is true for comonads.

Distributivity laws may be understood as monads internal to this 2-category of monads.

In particular, distributive laws themselves make a 2-category.

There are other variants like distributive laws between a monad and an endofunctor, mixed distributive laws between a monad and a comonad (the variants for algebras and coalgebras called entwining structures), distributive laws between actions of two different monoidal categories on the same category, for PROPs and so on.

Having a distributive law ll from one monad to another enables to define the composite monad T lP\mathbf T\circ_l\mathbf P. This correspondence extends to a 2-functor comp:Mnd(Mnd(C))Mnd(C)\mathrm{comp} \,\colon\, \mathrm{Mnd}(\mathrm{Mnd}(C))\to\mathrm{Mnd}(C). An analogue of this 2-functor in the mixed setup is a 2-functor from the bicategory of entwinings to a bicategory of corings.

Explicit definition

Monad distributing over monad

Definition

A distributive law for a monad T=(T,μ T,η T)\mathbf{T} = (T, \mu^T, \eta^T) in AA over an endofunctor PP is a 2-morphism l:TPPTl : T P \Rightarrow P T such that l(η T) P=P(η T)l \circ (\eta^T)_P = P(\eta^T) and l(μ T) P=P(μ T)l TT(l)l \circ (\mu^T)_P = P(\mu^T) \circ l_T \circ T(l). In diagrams:

Distributive laws for the monad T\mathbf{T} over the endofunctor PP are in a canonical bijection with lifts of PP to an endofunctor P TP^{\mathbf T} in the Eilenberg-Moore category A TA^{\mathbf T}, satisfying U TP T=PU TU^{\mathbf T} P^{\mathbf T} = P U^{\mathbf T}. Indeed, the endofunctor P TP^{\mathbf T} is given by (M,ν)(PM,P(ν)l M)(M,\nu) \mapsto (P M,P(\nu)\circ l_M).

Definition

A distributive law for a monad T=(T,μ T,η T)\mathbf{T} = (T, \mu^T, \eta^T) over a monad P=(P,μ P,η P)\mathbf{P} = (P, \mu^P, \eta^P) in AA is a distributive law for T\mathbf T over the endofunctor PP, compatible with μ P,η P\mu^P,\eta^P in the sense that lT(η P)=(η P) Tl \circ T(\eta^P) = (\eta^P)_T and lT(μ P)=(μ P) TP(l)l Pl \circ T(\mu^P) = (\mu^P)_T \circ P(l) \circ l_P. In diagrams:

(due to Beck 1969, review includes Barr & Wells 1985 §9 2.1)

The correspondence between distributive laws and endofunctor liftings extends to a correspondence between distributive laws and monad liftings. That is, distributive laws l:TPPTl \colon T P \Rightarrow P T from the monad T\mathbf{T} to the monad P\mathbf{P} are in a canonical bijection with lifts of the monad P\mathbf{P} to a monad P T\mathbf{P}^{\mathbf T} in the Eilenberg-Moore category A TA^{\mathbf T}, such that U T:A TAU^{\mathbf T} \colon A^{\mathbf T}\to A preserves the monad structure.

Thus all together a distributive law for a monad over a monad is a 2-cell for which 2 triangles and 2 pentagons commute. In the entwining case, Brzeziński and Majid combined the 4 diagrams into one picture which they call the bow-tie diagram.

Remark

(distributivity as monads in monads)
As mentioned earlier, one can understand a distributivity law of a monad (a,s)(a,s) over another monad (a,t)(a,t) as displaying s:aas \colon a \to a as a monad on (a,t)(a,t) in the 2-category Mnd(A)\mathbf{Mnd}(A) of monads in a 2-category AA.

Specifically, a monad in Mnd(A)\mathbf{Mnd}(A) over (a,t)(a,t) (which is a monad in AA!) is comprised of the following data:

  1. A 1-morphism s:aas \colon a \to a in AA, together with an intertwiner λ:tsst\lambda \colon t s \to s t satisfying the equations here

  2. Two 2-morphisms (in Mnd(A)\mathbf{Mnd}(A)) σ:1(s,λ)\sigma \colon 1 \Rightarrow (s,\lambda) and ν:(s,λ)(s,λ)(s,λ)\nu \colon (s,\lambda)(s,\lambda) \Rightarrow (s,\lambda) which correspond to two 2-morpisms in AA σ:1s\sigma \colon 1 \Rightarrow s, ν:sss\nu \colon s s \Rightarrow s commuting with the intertwiners of 11, ss and ssss.

Then λ\lambda is the distributive law sought, and the laws λ\lambda, σ\sigma and ν\nu satisfy correspond to those of a distributive law.

Monad distributing over a comonad

van Osdol 1973 p. 456

(…)

Comonad distributing over monad

The distributivity law of

  • a comonad 𝒞\mathcal{C} over

  • a monad \mathcal{E}

on the same category C\mathbf{C}

is as follows (Brookes & Van Stone 1993 Def. 3, Power & Watanabe 2002):

A natural transformation

distr (-) 𝒞,:𝒞(())(𝒞()) distr^{\mathcal{C}, \mathcal{E}}_{(\text{-})} \;\;\colon\;\; \mathcal{C} \big( \mathcal{E}(-) \big) \longrightarrow \mathcal{E} \big( \mathcal{C}(-) \big)

such that the following diagrams commute for all objects DD:

Given this distributivity structure, there is a two-sided (“double”) Kleisli category (Brookes & Van Stone 1993 Thm. 2, Power & Watanabe 2002, Prop. 7.4) whose objects are those of C\mathbf{C}, and whose morphisms D 1D 2D_1 \to D_2 are morphisms in C\mathbf{C} of the form

prog 12:𝒞(D 1)(D 2) prog_{12} \;\colon\; \mathcal{C}(D_1) \longrightarrow \mathcal{E}(D_2)

with two-sided Kelisli composition

prog 12>=>prog 23:𝒞(D 1)(D 3) prog_{12} \text{>=>} prog_{23} \;\; \colon \;\; \mathcal{C}(D_1) \longrightarrow \mathcal{E}(D_3)

given by the (co-)bind-operation on the factors connected by the distributivity transformation:

Examples

Products distributing over coproducts

In a distributive category products distribute over coproducts.

In Cat

  • There is a distributive law of the monad (on Set) for monoids over the monad for abelian groups, whose composite is the monad for rings. This is the canonical example which gives the name to the whole concept.

Tensor products distributing over direct sums

For many standard choices of tensor products in the presence of direct sums the former distribute over the latter. See at tensor product of abelian groups and tensor product of modules.

In other 2-categories

Literature

For a study of distributive laws between monads and (pointed) endofunctors, see:

  • Marina Lenisa, John Power, and Hiroshi Watanabe, Distributivity for endofunctors, pointed and co-pointed endofunctors, monads and comonads, Electronic Notes in Theoretical Computer Science 33 (2000): 230-260.

For a thorough study of mixed distributive laws, see:

On distributive laws for relative monads:

Invertible distributive laws are considered in Lemma 4.12 of:

  • Bob Rosebrugh, Richard J. Wood, Distributive Adjoint Strings, Theory and Applications of Categories, 1 6 (1995) 119-145 [tac:1-06]

  • Stefano Kasangian, Stephen Lack, and Enrico Vitale. Coalgebras, braidings, and distributive laws, Theory and Applications of Categories 13.8 (2004): 129-146. (html)

  • Alain Bruguieres and Alexis Virelizier, Quantum double of Hopf monads and categorical centers, Transactions of the American Mathematical Society 364.3 (2012): 1225-1279.

Last revised on September 21, 2024 at 12:44:26. See the history of this page for a list of all contributions to it.